/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package core.comparators;

import core.comparators.BookComparator.BOOKCOMPARATORTYPE;
import core.comparators.CourseComparator.COURSECOMPARATORTYPE;
import core.comparators.ProgramComparator.PROGRAMCOMPARATORTYPE;
import core.comparators.SchoolComparator.SCHOOLCOMPARATORTYPE;
import core.comparators.ShopComparator.SHOPCOMPARATORTYPE;
import core.comparators.UserComparator.USERCOMPARATORTYPE;
import java.util.Comparator;

/**
 *
 * @author Administrator
 */
public class ComparatorFactory {


    public static Comparator getBookComparator(BOOKCOMPARATORTYPE type, boolean ascending)
    {
        BookComparator bcf = new BookComparator();
        return bcf.getComparator(type, ascending);
    }

    public static Comparator getCourseComparator(COURSECOMPARATORTYPE type, boolean ascending)

    {
        CourseComparator ccf = new CourseComparator();
        return ccf.getComparator(type, ascending);
    }
    
    public static Comparator getProgramComparator(PROGRAMCOMPARATORTYPE type, boolean ascending)

    {
        ProgramComparator ccf = new ProgramComparator();
        return ccf.getComparator(type, ascending);
    }

        public static Comparator getSchoolComparator(SCHOOLCOMPARATORTYPE type, boolean ascending)

    {
        SchoolComparator ccf = new SchoolComparator();
        return ccf.getComparator(type, ascending);
    }
        public static Comparator getShopComparator(SHOPCOMPARATORTYPE type, boolean ascending)

    {
        ShopComparator ccf = new ShopComparator();
        return ccf.getComparator(type, ascending);
    }

                public static Comparator getUserComparator(USERCOMPARATORTYPE type, boolean ascending)

    {
        UserComparator ccf = new UserComparator();
        return ccf.getComparator(type, ascending);
    }
}
